Skip to content

SPLAT-2680: Changed DHA to require hostAffinity=host#1484

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
vr4manta:SPLAT-2680
Mar 23, 2026
Merged

SPLAT-2680: Changed DHA to require hostAffinity=host#1484
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
vr4manta:SPLAT-2680

Conversation

@vr4manta
Copy link
Contributor

@vr4manta vr4manta commented Mar 20, 2026

SPLAT-2680

Changes

  • Changed DHA logic to require hostAffinity=host so instances do not drift off of the allocated host when restarted

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 20, 2026

@vr4manta: This pull request references SPLAT-2680 which is a valid jira issue.

Details

In response to this:

SPLAT-2680

Changes

  • Changed DHA logic to require hostAffinity=host so instances do not drift off of the allocated host when restarted

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f2eaf7c5-3f47-4fdb-8e9c-0b7173d6d8fd

📥 Commits

Reviewing files that changed from the base of the PR and between 221c405 and 453cf66.

📒 Files selected for processing (2)
  • pkg/webhooks/machine_webhook.go
  • pkg/webhooks/machine_webhook_test.go

Walkthrough

Added validation in AWS placement tenancy processing to enforce that when dynamic host allocation strategy is used, the host affinity must be configured as DedicatedHost rather than HostAffinityAnyAvailable. The validation appends a field error if this constraint is violated. Corresponding test cases were updated to expect the new validation error.

Changes

Cohort / File(s) Summary
Webhook Validation
pkg/webhooks/machine_webhook.go
Added validation in processAWSPlacementTenancy to check that when spec.placement.host.dedicatedHost is set with dynamic allocation strategy, the host affinity must be DedicatedHost and not HostAffinityAnyAvailable.
Test Updates
pkg/webhooks/machine_webhook_test.go
Updated two test case expectations to reflect the new validation behavior; cases with AnyAvailable affinity and dynamic allocation strategy now correctly expect admission denial with the constraint error message.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.3)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 20, 2026

@vr4manta: This pull request references SPLAT-2680 which is a valid jira issue.

Details

In response to this:

SPLAT-2680

Changes

  • Changed DHA logic to require hostAffinity=host so instances do not drift off of the allocated host when restarted

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@RadekManak
Copy link
Contributor

/lgtm
/approve
/verified bypass
Units are sufficient

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 23, 2026
@openshift-ci-robot
Copy link
Contributor

@RadekManak: The verified label has been added.

Details

In response to this:

/lgtm
/approve
/verified bypass
Units are sufficient

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RadekManak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 23, 2026
@RadekManak
Copy link
Contributor

/override ci/prow/e2e-metal-ipi-ovn-ipv6,ci/prow/e2e-metal-ipi-virtualmedia
ci/prow/e2e-metal-ipi-virtualmedia

This is aws webhook

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@RadekManak: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • ci/prow/e2e-metal-ipi-ovn-ipv6,ci/prow/e2e-metal-ipi-virtualmedia

Only the following failed contexts/checkruns were expected:

  • CodeRabbit
  • ci/prow/e2e-aws-operator
  • ci/prow/e2e-aws-ovn
  • ci/prow/e2e-aws-ovn-upgrade
  • ci/prow/e2e-metal-ipi
  • ci/prow/e2e-metal-ipi-ovn-ipv6
  • ci/prow/e2e-metal-ipi-virtualmedia
  • ci/prow/goimports
  • ci/prow/golint
  • ci/prow/govet
  • ci/prow/images
  • ci/prow/okd-scos-images
  • ci/prow/unit
  • ci/prow/verify-crds-sync
  • ci/prow/verify-deps
  • pull-ci-openshift-machine-api-operator-main-e2e-aws-operator
  • pull-ci-openshift-machine-api-operator-main-e2e-aws-ovn
  • pull-ci-openshift-machine-api-operator-main-e2e-aws-ovn-upgrade
  • pull-ci-openshift-machine-api-operator-main-e2e-metal-ipi
  • pull-ci-openshift-machine-api-operator-main-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-machine-api-operator-main-e2e-metal-ipi-virtualmedia
  • pull-ci-openshift-machine-api-operator-main-goimports
  • pull-ci-openshift-machine-api-operator-main-golint
  • pull-ci-openshift-machine-api-operator-main-govet
  • pull-ci-openshift-machine-api-operator-main-images
  • pull-ci-openshift-machine-api-operator-main-okd-scos-images
  • pull-ci-openshift-machine-api-operator-main-unit
  • pull-ci-openshift-machine-api-operator-main-verify-crds-sync
  • pull-ci-openshift-machine-api-operator-main-verify-deps
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

Details

In response to this:

/override ci/prow/e2e-metal-ipi-ovn-ipv6,ci/prow/e2e-metal-ipi-virtualmedia
ci/prow/e2e-metal-ipi-virtualmedia

This is aws webhook

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@RadekManak
Copy link
Contributor

/override ci/prow/e2e-metal-ipi-ovn-ipv6 ci/prow/e2e-metal-ipi-virtualmedia

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@RadekManak: Overrode contexts on behalf of RadekManak: ci/prow/e2e-metal-ipi-ovn-ipv6, ci/prow/e2e-metal-ipi-virtualmedia

Details

In response to this:

/override ci/prow/e2e-metal-ipi-ovn-ipv6 ci/prow/e2e-metal-ipi-virtualmedia

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2026

@vr4manta: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 9396f03 into openshift:main Mar 23, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants